//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;
using System.Collections.Generic;
using System.Text;

namespace Microsoft.Research.DataLayer
{
    public abstract partial class Connection
    {
        /// <summary>
        /// Action being requested from the data storage.
        /// 
        /// An 'action' is an operation that will either fetch, update or delete data from the
        /// storage.
        /// </summary>
        public enum Action
        {
            /// <summary>
            /// Adds a new instance of an object or relation to the backend
            /// </summary>
            Add,

            /// <summary>
            /// Deletes an instance of an object or relation from the backend
            /// </summary>
            Delete,

            /// <summary>
            /// Updates the backend with updated information
            /// </summary>
            Update,

            /// <summary>
            /// Counts items in the data store
            /// </summary>
            Count,

            /// <summary>
            /// Fetches an object by name
            /// </summary>
            Get,

            /// <summary>
            /// Fetches all instances of an object type
            /// </summary>
            GetAll,

            /// <summary>
            /// Fetches the 'root' object. Root objects are object that are part of a 
            /// self relationship and does not have a parent.
            /// </summary>
            GetRoot,

            /// <summary>
            /// Fetches an object by ID
            /// </summary>
            GetByID,

            /// <summary>
            /// Fetches an object by a relationship with another object
            /// </summary>
            GetByObject,

            /// <summary>
            /// Search for the object (caller provides a 'text' to search for).
            /// 
            /// It is the backend responsbility to implement the search in the most
            /// productive and meaningful way possible.
            /// </summary>
            Search,

            /// <summary>
            /// Executes the statement.
            /// </summary>
            Execute,
        }
    }
}
